#ifndef PUZZLEWINDOW_H
#define PUZZLEWINDOW_H

#include <QWidget>
#include <QPushButton>
#include <QGridLayout>

class PuzzleWindow : public QWidget
{
    Q_OBJECT

public:
    PuzzleWindow(QWidget *parent = nullptr);

private slots:
    void handleButtonClick();
    void shuffle();
    bool checkPuzzleSolved();

private:
    QPushButton* buttons[3][3];
    int emptyRow;
    int emptyCol;
    void swapButtons(int row1, int col1, int row2, int col2);
};

#endif // PUZZLEWINDOW_H
